package com.kyuketsukistudios.mikatsuki.mainmenu 
{
	import com.kyuketsukistudios.mikatsuki.assetmanager.AssetManager;
	import com.kyuketsukistudios.mikatsuki.data.SingletonData;
	import flash.display.LoaderInfo;
	import flash.display.MovieClip;
	import org.casalib.display.CasaMovieClip;
	import org.casalib.display.CasaSprite;
	
	/**
	 * ...
	 * @author RZEROSTERN
	 */
	public class MainMenu extends CasaSprite 
	{
		private var m_assetLibrary:AssetManager;
		private var m_mainMenu:MovieClip;
		private var m_loaderInfo:LoaderInfo;
		
		public function MainMenu(p_loaderInfo:LoaderInfo) 
		{
			m_loaderInfo = p_loaderInfo;
			m_assetLibrary = new AssetManager(onLibraryLoaded, "mainMenu");
		}
		
		private function onLibraryLoaded():void 
		{
			this.m_loaderInfo = m_loaderInfo;
			//We confirm the loading of our library.
			SingletonData.getInstance().sendToConsole(0x00ff00, "Library mainMenuLib.swf has been loaded");
			
			m_mainMenu = m_assetLibrary.getMyAsset("MainMenu", "mc");
			m_mainMenu.x = m_mainMenu.y = 0;
			addChild(m_mainMenu);
		}
		
	}

}